package com.learn.worksession.controller;

import com.learn.worksession.pojo.Resume;
import com.learn.worksession.service.ResumeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import java.util.List;

/**
 * @program: loginproject
 * @description
 * @author: luffy
 * @create: 2020-08-13 01:54
 */
@Controller
@RequestMapping("/result")
public class ResultController {

    @Autowired
    private ResumeService resumeService;

    @RequestMapping(value = "/result")
    public String result(Model model) {
        List<Resume> resumeList = resumeService.findAll();
        model.addAttribute("resumeList", resumeList);

        return "index";
    }
}
